home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- this.digits = new Array(figure);
- var _loc2_ = 0;
- while(_loc2_ < figure)
- {
- var _loc4_ = "digit" + _loc2_;
- this.attachMovie(this.clipname,_loc4_,_loc2_);
- var _loc3_ = this[_loc4_];
- _loc3_._x = _loc2_ * _loc3_._width;
- _loc3_.power = Math.pow(10,digits.length - _loc2_ - 1);
- this.digits[_loc2_] = _loc3_;
- _loc2_ = _loc2_ + 1;
- }
- }
- function reset()
- {
- this.value = this.initvalue;
- updatedisplay();
- }
- function increment(n)
- {
- var _loc2_ = Math.floor(n);
- this.value += _loc2_;
- updatedisplay();
- }
- function updatedisplay()
- {
- var _loc5_ = this.value;
- var _loc3_ = 0;
- while(_loc3_ < this.figure)
- {
- var _loc2_ = this.digits[_loc3_];
- var _loc4_ = int(_loc5_ / _loc2_.power);
- _loc5_ -= _loc4_ * _loc2_.power;
- _loc2_["set"](_loc4_);
- _loc3_ = _loc3_ + 1;
- }
- }
- init();
- stop();
-